package com.zking.web.lp;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zking.service.lp.OpenBasedao;


@Controller
public class OpenController {
	
	@Autowired
	private OpenBasedao openBasedao;
	
	
	@RequestMapping(value = "/Opens")
	public String Opens(String number,String mail) {
		int i = openBasedao.upOpens(number,mail);
		if(i!=0) {
			return "bindStep2";
		}else {
			return "bindStep1";
		}
	}
	
	@RequestMapping(value = "/Names")
	public String Names(String com_name) {
		int i = openBasedao.upNames(com_name);
		if(i!=0) {
			return "bindStep3";
		}else {
			return "bindStep2";
		}
	}
}
